﻿<UserControl x:Class="TechNewLogic.GraphIT.Hv.Horizontal.IntervalControl"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:Core="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
		mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" x:Name="root"
		x:ClassModifier="internal">

	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/TechNewLogic.GraphIT;component/Styles/RoundButton.xaml" />
			</ResourceDictionary.MergedDictionaries>
			<BooleanToVisibilityConverter x:Key="bvc" />
		</ResourceDictionary>
	</UserControl.Resources>

	<VisualStateManager.CustomVisualStateManager>
		<Core:ExtendedVisualStateManager />
	</VisualStateManager.CustomVisualStateManager>

	<VisualStateManager.VisualStateGroups>
		<VisualStateGroup x:Name="CommonStates">
			<VisualState x:Name="Normal" />
			<VisualState x:Name="MouseOver">
				<Storyboard>
					<DoubleAnimation Storyboard.TargetName="popupGrid"
							Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.15" />
				</Storyboard>
			</VisualState>
		</VisualStateGroup>
	</VisualStateManager.VisualStateGroups>

	<Grid x:Name="popupGrid" Background="#01000000" Opacity="0.4"
			Visibility="{Binding IsInOfflineMode, ElementName=root, Converter={StaticResource bvc}}">

		<Border Background="{DynamicResource GeneralBackground}" CornerRadius="3,3,0,0"
				BorderThickness="1.5" BorderBrush="{DynamicResource GeneralForeground}">
			<UniformGrid Columns="2" Margin="5">
				<Button Content="&lt;" Style="{StaticResource RoundButtonStyle}" FontSize="8"
						FontWeight="Bold" Background="{DynamicResource GeneralBackground}"
						Width="22" Foreground="{DynamicResource GeneralForeground}" Height="22"
						Command="{Binding IntervalLeftCommand, ElementName=root}" />
				<Button Content="&gt;" Style="{StaticResource RoundButtonStyle}" FontSize="8"
						FontWeight="Bold" Background="{DynamicResource GeneralBackground}"
						Width="22" Foreground="{DynamicResource GeneralForeground}" Height="22"
						Command="{Binding IntervalRightCommand, ElementName=root}" />
			</UniformGrid>
		</Border>
	</Grid>

</UserControl>
